package day18;

import java.util.Random;

public class MathDemo {

	
	public static void main(String[] args) {
		sop("abs="+Math.abs(-1));
		sop("pow="+Math.pow(2, 3));
		sop("round="+Math.round(12.34));
		sop(Math.random() * 10 +1);
		//注意:使用Random类
		Random random = new Random();
		sop("Random="+(random.nextInt(10)+1));
		sop(Integer.valueOf('a')); //97
		sop(Integer.valueOf('A')); //65
		sop(Integer.valueOf('1')); //49
	}    
	
	/**
	 * @param obj
	 */
	public static void sop(Object obj) {
		System.out.println(obj);
	}
}
